<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./options.css">
    <link rel="stylesheet" href="./game.css">
    <title>21点游戏</title>
    <style>
        /* 通用样式，消除浏览器默认样式 */
        
        * {
            margin: 0px;
            padding: 0px;
            box-sizing: border-box;
            /* 消除列表前面的圆点 */
            list-style: none;
        }
    </style>
</head>

<body>
    <main>
        <!-- 游戏选项界面 -->
        <div class="form-box">
            <h2>游戏参数设置</h2>
            <div class="form-row">
                <span>请选择玩家数量:</span>
                <select id="option-player">
                <option value="1" selected>1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
            </select>
            </div>
            <div class="form-row">
                <span>玩家金额:</span>
                <input id="option-points" type="range" name="points" step="100" min="500" max="1200" value="500" oninput="handleInput(this)">
                <span id="points-value">500</span>
            </div>
            <div class="form-row">
                <button onclick="handleOptionSet()">确定</button>
            </div>
        </div>
        <!-- 游戏正式运行界面 -->
        <div class="game-box">
            <!-- 庄家界面-->
            <div class="banker-box">
                <div class="info-view">
                    <p>赢的次数：<span class="span-display">0</span></p>
                    <p>输的次数：<span class="span-display">0</span></p>
                </div>
                <div class="cards-view">
                    <div>
                        <p>当前点数：<span class="display-points"></span></p>
                    </div>
                    <ul class="display-cards">
                    </ul>
                </div>
            </div>
            <!-- 玩家界面（列表标签） -->
            <ul class="player-box">
                <li class="player-item-box">
                </li>
                <li class="player-item-box">
                </li>
                <li class="player-item-box">
                </li>
                <li class="player-item-box">
                </li>
            </ul>
        </div>
        <!-- 模板：默认不显示，只要来作为创建界面的原型 -->
        <div id="templates" style="display: none;">
            <div class="with-player-box">
                <div class="display-view-box">
                    <div class="info-view">
                        <p>当前金额：<span class="span-display"></span></p>
                        <p>押注金额：<span class="span-display"></span></p>
                        <p>赢的次数：<span class="span-display">0</span></p>
                        <p>输的次数：<span class="span-display">0</span></p>
                    </div>
                    <div class="cards-view">
                        <div>
                            <p>当前点数：<span class="display-points"></span></p>
                        </div>
                        <ul class="display-cards">
                        </ul>
                    </div>
                </div>
                <div class="procedure-view-box">
                    <div class="cut-box need-hidden procedure-box">
                        <h3>是否切牌</h3>
                        <div class="btn-box">
                            <!-- 事件绑定函数可以传入一个参数 -->
                            <button onclick="handleCut(true)">是</button>
                            <button onclick="handleCut(false)">否</button>
                        </div>
                    </div>
                    <!-- need-hidden: 需要隐藏 -->
                    <div class="bet-box need-hidden procedure-box">
                        <h3>请选择押注金额</h3>
                        <input class="bet-input" type="range" name="points" step="100" min="100" value="100" max="300" oninput="handleBetChange(this)">
                        <span class="bet-show-points">100</span>
                        <button onclick="handleBet()">押注</button>
                    </div>
                    <div class="request-box need-hidden procedure-box">
                        <h3>是否要牌</h3>
                        <div class="btn-box">
                            <!-- 事件绑定函数可以传入一个参数 -->
                            <button onclick="handleRequest(true)">是</button>
                            <button onclick="handleRequest(false)">否</button>
                        </div>
                    </div>
                </div>
                <!-- 爆掉界面：默认隐藏 -->
                <div class="boom-view-box need-hidden">
                    <h3>你已经爆掉</h3>
                </div>
            </div>
            <div class="without-player-box">
                <div>无人游玩</div>
            </div>
        </div>
    </main>
</body>
<script src="./cards.js"></script>
<script src="./options.js"></script>
<script src="./game.js"></script>
<script>
</script>

</html>